Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

The loadChildrenHelper function can return either an Observable or a Promise. This change ensures that we correctly handle both cases by checking if the return value is "thenable" before calling .toPromise().

This provides compatibility with different versions of Angular framework that have different return types for loadChildren.

This is a temporary workaround and should be removed when Angular framework v21.0.0-next.7 is released.

@alan-agius4 alan-agius4 requested a review from clydin October 14, 2025 07:19
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Oct 14, 2025
…nHelper`

The `loadChildrenHelper` function can return either an Observable or a Promise.
This change ensures that we correctly handle both cases by checking if the
return value is "thenable" before calling `.toPromise()`.

This provides compatibility with different versions of Angular framework that have different return types for `loadChildren`.

This is a temporary workaround and should be removed when Angular framework v21.0.0-next.7 is released.
@alan-agius4 alan-agius4 force-pushed the refactor-remove-to-promise branch from 64c74b4 to 14e9c0f Compare October 14, 2025 07:24
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 14, 2025
@alan-agius4 alan-agius4 merged commit f8c0744 into angular:main Oct 14, 2025
30 checks passed
@alan-agius4 alan-agius4 deleted the refactor-remove-to-promise branch October 14, 2025 13:02
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/ssr target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants